package com.lovegu.thrownable;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @author 老顾
 * @title: ThrowsTest
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/9/22 14:51
 */
public class ThrowsTest {
    public static void main(String[] args) {
        ThrowsTest t = new ThrowsTest();
        try {
            t.readFile();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public void readFile() throws IOException {
        FileInputStream in = new FileInputStream("atguigushk.txt");
        int b;
        b = in.read();
        while (b != -1) {
            System.out.print((char) b);
            b = in.read();
        }
        in.close();
    }
}
